//
//  YZEKefuViewController.m
//  yilutongxing
//
//  Created by T&J on 2017/3/29.
//  Copyright © 2017年 YZE. All rights reserved.
//

#import "YZEKefuViewController.h"
#import "functions.h"

@implementation KefuInfoBean
@end

@interface YZEKefuViewController ()
@property (strong, nonatomic) IBOutlet UILabel *kefu_tel;
@property (strong, nonatomic) IBOutlet UILabel *kefu_qq;

@end

@implementation YZEKefuViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBarHidden = NO;
    self.navigationItem.title = @"联系客服";
    
    [[YZENetwork sharedInstace] getRequestWithUrl:[NSString stringWithFormat:@"%@%@", BASE, URL_KefuInfo] parameters:nil delegate:self requestTag:1 successBlock:^(id responseObject) {
        KefuInfoBean *bean = [KefuInfoBean mj_objectWithKeyValuesAdd:(NSArray*)responseObject[0]];
        
        self.kefu_tel.text = bean.tel;
        self.kefu_qq.text = bean.qq;
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    //#warning Incomplete implementation, return the number of sections
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    //#warning Incomplete implementation, return the number of rows
    return 2;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    if (indexPath.row==0) {
        [functions dianalTelephone:self.kefu_tel.text];
    }
}


@end
